package com.peter.pref.fragment;

import android.os.Bundle;
import android.util.Log;

import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;

import com.peter.pref.R;

public class PrefScreen extends PreferenceFragmentCompat {

    private static final String TAG = "Peter";

    @Override
    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
        setPreferencesFromResource(R.xml.prefscreen, rootKey);

        final Preference r = findPreference("expandable");

        r.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
            @Override
            public boolean onPreferenceClick(Preference preference) {
                Log.e(TAG, "onPreferenceClick: ====================================");
                return false;
            }
        });
    }
}
